package com.cy.springcloudalibabagraphiql.entity;

import lombok.*;

import javax.persistence.Id;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Data
@ToString
@Builder
@AllArgsConstructor
@Entity
@Table(name="articles")
public class Article implements Serializable {
    private static final long serialVersionUID = 7534580196624531905L;
    @Id
    @GeneratedValue
    private Long id;
    @Column(name="title")
    private String title;
    @Column(name="content")
    private String content;
    @Column(name="authorId")
    private Long authorId;
    @Column(name="createBy")
    private Date createBy;
    @Column(name="thumbUp")
    private Integer thumbUp;
    public Article(){}
}
